
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>在线答疑系统</title>
<link rel="stylesheet" type="text/css" href="style/style.css"/>
</head>

<body>

<div id="top">
	<div class="title">
     在线答疑系统
	</div>
  <div style="height:30px; width:190px; position:relative; left:870px;bottom:145px; margin:0px;">
 <c:if test="${teacher==null&&student==null }" var="a"> 

   	<a href="./login.jsp">登陆</a> 
   	<a href="./regedit.jsp">注册</a> 
   </c:if>
   	<c:if test="${teacher!=null }">
   		欢迎您，${teacher.trealname }老师！
   	</c:if>
   	<c:if test="${student!=null }">
   		欢迎您，${student.srealname }同学！
   	</c:if>
   </div>
</div>
<div id="content">
	<div class="left"><span style="height:25px;">当前位置：首页</span>
    	<div id="course">
        <table style="width:650px; margin-bottom:5px;">
         <c:forEach var="course" items="${courseL }" varStatus="i">
        	<c:if test="${i.count%2==1 }">
        	<tr>
        	</c:if>
            	<td width="50%" height="125px" class="line">
            		<table>
                		<tr style="overflow:visible;">
                    		<td rowspan="3" style="padding-right:5px;"><img src=".${course.cpic }" height="64" width="64" /></td>
                      		<td><a href="./category?cids=${course.cid }" style=" font-weight:bold; color:#000; text-decoration:none;">${course.cname }</a></td>
                    	</tr>
                    	<tr><td><a href="./category?cids=${course.cid }" style="background:url(img/a_icon.gif) no-repeat; background-position:0 9px;color:#F00;padding-left:10px;">点击进入</a></tr>
                    	<tr><td>&nbsp;</td></tr>
                	</table>
             	</td>
             <c:if test="${i.count%2==0 }">
             	</tr>
             </c:if>	
          </c:forEach>
        </table>
        
        </div>
        <div style="margin-bottom:10px; padding:10px 20px;">
        &nbsp;&nbsp;&nbsp;君子学必好问。问与学，相辅而行者也，非学无以致疑，非问无以广识。好学而不勤问，非真能好学者也。理明矣，而或不达于事，识其大矣，而或不知其细，舍问，其奚决焉？
        智者千虑，必有一失。圣人所不知，未必不为愚人之所知也；愚人之所能，未必非圣人之不能也。理无专在，而学无止境也，然则问可少耶？
   	  </div>
    </div>
  <div class="right" style="padding:10px;">
  	<p align="center" style="height:24px; font-weight:bold;"><font color="#FF0000">最新问题</font></p>
  	<table width="320px" style="margin:0px; border-top:1px solid;">
    	<tr>
            <td>
            	<ul style="font-size:13px; list-style-type:square;padding-left:20px;">
            	<c:forEach var="problem" items="${problemL }">
            	<li><a href="./view.jsp">${problem.ptitle }</a></li>
            	</c:forEach>
            	<!-- 
            	<li><a href="./view.jsp">问题一</a></li>
            	<li><a href="./view.jsp">问题一</a></li>
            	<li><a href="./view.jsp">问题一</a></li>
            	<li><a href="./view.jsp">问题一</a></li>
            	<li><a href="./view.jsp">问题一</a></li>
            	<li><a href="./view.jsp">问题一</a></li>
            	<li><a href="./view.jsp">问题一</a></li>
            	<li><a href="./view.jsp">问题一</a></li>
            	<li><a href="./view.jsp">问题一</a></li>
            	 -->
                </ul>
            </td>
        </tr>
    </table>
    
    </div>
    <div style="clear:both;"></div>
</div>
<div id="footer">
	<div align="center" style=" position:relative; top:90px;">
    	&copy;2011-2012版权所有 dmt312技术支持
    </div>
</div>
</body>
</html>

